import {request} from "@/network/request";

//增加留言
export function insertMessage(parentMessageId, content, userId) {
  return request({
    url: '/message/insertMessage',
    method: 'post',
    data: {
      parentMessageId,
      content,
      userId
    }
  })
}

export function listMessageVo(pageNo, pageSize) {
  return request({
    url: '/message/listMessageVo',
    params: {
      pageNo,
      pageSize
    }
  })
}

//删除留言
export function deleteMessage(messageId) {
  return request({
    url: '/message/deleteMessage',
    method: 'delete',
    params: {
      messageId
    }
  })
}

//更新置顶状态
export function updateMessageTop(messageId, top) {
  return request({
    url: '/message/updateTopping',
    method: 'post',
    params: {
      messageId,
      top
    }
  })
}